package com.chp.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author chp
 * @since 2025-01-13
 */
@Getter
@Setter
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "PROD_ID", type = IdType.AUTO)
    private Integer prodId;

    private String prodName;

    private Integer price;

    private Integer quantity;

    private String description;

    private Integer catId;

    @TableField(exist = false)
    private String catName;
    @TableLogic
    private Integer deleted;

    // 自动填充配置
    @TableField(fill = FieldFill.INSERT)            // 插入数据时填充
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)     // 插入和修改时都会填充
    private LocalDateTime updateTime;
}
